/**
 * Created by Administrator on 2018/9/28.
 */
$(f);

function f(){
    $(".pimg").mouseover(pimgMouseOver);
    $(".pimg").mouseout(pimgMouseOut);
  $(".pimg").mousemove(pimgMouseMove);
}

function pimgMouseOver(){
    $(".bimg").show();
}

function pimgMouseOut(){
    $(".bimg").hide();
}

function pimgMouseMove(e){
   //console.log(e.offsetX+" "+e.offsetY);
   var x = e.offsetX;
   var y = e.offsetY;
   console.log(x+" "+y);
   $(".bimg").css("background-positionX",(-(x*2)+200)+"px");
   $(".bimg").css("background-positionY",(-(y*2)+200)+"px");
  //$(".bimg").show();
}